package com.minicat.server;

public class HttpProtocolUtil {

    public static String getHttp200(Integer size){
        return "HTTP/1.1 200 OK\n"+
                "Cache-Control: private \n"+
                "Content-length: "+size+"\n" +
                "Content-Type: text/html\n"+
                "\r\n";
    }

    public static String getHttp200(Integer size,String contentType){
        return "HTTP/1.1 200 OK\n"+
                "Cache-Control: private \n"+
                "Content-length: "+size+"\n" +
                "Content-Type: "+contentType+"\n"+
                "\r\n";
    }

    public static String getHttpHead404(){
        String str404 = "<h2>404 Not Found</h2>";
        return "HTTP/1.1 404 NOT Found\n"+
                "Content-Type: text/html\n"+
                "Content-Length: "+str404.length()+"\n"+
                "\r\n"+str404;
    }
}
